package com.hcy.rabbitbasicmodel.enums;

/**
 * @Author huchenying
 * @Description
 * @Date 2021/12/29 15:27
 */
public enum MyChannel {
    OWN(1,"自营渠道"),OTHER(2,"其他渠道");
    final int code;
    final String desc;
    MyChannel(int code,String desc){
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
    public String getDescByCode(int code){
        if(code == OWN.code){
            return OWN.desc;
        }else {
            return OTHER.desc;
        }
    }
}
